# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
#项目名称
project(NAPI_Learning)
SET(USER_KEY "hello world")
MESSAGE("this var key " ${USER_KEY})
set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

#头文件查找路径
include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

#编译目标so，支持shared动态库，static静态链接两种形式

add_library(entry SHARED
    ${NATIVERENDER_ROOT_PATH}/src/WorkDemo.cpp
    ${NATIVERENDER_ROOT_PATH}/src/ClassBind.cpp
    ${NATIVERENDER_ROOT_PATH}/src/NapiRegister.cpp
)

#编译so的依赖，支持so的查找路径%SDK_HOME%/native/3.2.2.3/sysroot/usr/lib
target_link_libraries(entry PUBLIC libace_napi.z.so libuv.so
    libhilog_ndk.z.so)